/**
 * 
 */
package com.axxc.jpa.web;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RestController;

import com.axxc.jpa.service.IStuCrudService;

import io.swagger.annotations.ApiOperation;

/**
 * @ClassName: AbstractStudentCrudController
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author 熊小川
 * @date 2018年5月13日 下午6:04:18
 * @See
 */
@RestController
public abstract class AbstractStudentCrudController<M, ID extends Serializable> {
	@Autowired(required = false)
	protected IStuCrudService<M, ID> stuCrudService;

	@GetMapping("/count")
	@ApiOperation("按条件统计数量")
	public Long count(@ModelAttribute M model) {
		return this.stuCrudService.count(model);
	}

}
